<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>使⽤ JS 正则表达式，测试⼀段字符串的第⼀个字符是否为⼤写。</title>
</head>

<body>
  <script>
    let str = 'Asdsfsfsfsfsfdf'
    if ((/^[A-Z]/).test(str)) {
      console.log('true')
    } else {
      console.log('false')
    }
  </script>
</body>

</html>